
// #ifndef VUE3
import Vue from 'vue'
import App from './App'
import {router,RouterMount} from "@/helper/router.js"
import * as NetApi from "@/helper/request.js"
import progressHud from '@/helper/progressHud.js'
import UserMgr from '@/user/user.js'
import WeiXinAuth from '@/helper/auth.js'
import uView from "uview-ui"
import {imageUrl, versionInfo} from "@/config.js"
let mpShare = require('uview-ui/libs/mixin/mpShare.js');

Vue.use(uView)
Vue.use(router)
Vue.mixin(mpShare)

Vue.config.productionTip = false
Vue.prototype.$NetApi = NetApi;
Vue.prototype.$progressHud = progressHud;
Vue.prototype.$userMgr = UserMgr.shareInstance();
Vue.prototype.$imageUrl = imageUrl;
Vue.prototype.$versionInfo = versionInfo;
Vue.prototype.$weixinAuth = WeiXinAuth.shareInstance();

App.mpType = 'app'

const app = new Vue({
    ...App
})

// #ifdef H5
	RouterMount(app,router,'#app')
// #endif

// #ifndef H5
	app.$mount(); //为了兼容小程序及app端必须这样写才有效果
// #endif

// #endif

// #ifdef VUE3
import { createSSRApp } from 'vue'
import App from './App.vue'
export function createApp() {
  const app = createSSRApp(App)
  return {
    app
  }
}
// #endif